﻿using Common.Enums;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Core.DomainModels.Errors
{
    public class BusinessError
    {
        public ErrorCode ErrorCode
        {
            get;
            private set;
        }

        public string Message
        {
            get;
            private set;
        }

        public BusinessError(ErrorCode errorCode, string message)
        {
            this.ErrorCode = errorCode;
            this.Message = message;
        }

        public object Id { get; set; }
    }

    public class BusinessListError<T> : BusinessError
    {
        public BusinessListError(ErrorCode errorCode, string message) : base(errorCode, message)
        {

        }

        public string GroupName { get; set; }
        public List<T> Items { get; set; }
    }
}
